3.13 \(\int x^3 (a+b \sin (c+d x^2))^2 \, dx\)

Optimal. Leaf size=102 \[ \frac{a^2 x^4}{4}+\frac{a b \sin \left (c+d x^2\right )}{d^2}-\frac{a b x^2 \cos \left (c+d x^2\right )}{d}+\frac{b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}-\frac{b^2 x^2 \sin \left (c+d x^2\right ) \cos \left (c+d x^2\right )}{4 d}+\frac{b^2 x^4}{8} \]

[Out]

(a^2*x^4)/4 + (b^2*x^4)/8 - (a*b*x^2*Cos[c + d*x^2])/d + (a*b*Sin[c + d*x^2])/d^2 - (b^2*x^2*Cos[c + d*x^2]*Si
n[c + d*x^2])/(4*d) + (b^2*Sin[c + d*x^2]^2)/(8*d^2)

________________________________________________________________________________________

Rubi [A]  time = 0.133626, antiderivative size = 102, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3379, 3317, 3296, 2637, 3310, 30} \[ \frac{a^2 x^4}{4}+\frac{a b \sin \left (c+d x^2\right )}{d^2}-\frac{a b x^2 \cos \left (c+d x^2\right )}{d}+\frac{b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}-\frac{b^2 x^2 \sin \left (c+d x^2\right ) \cos \left (c+d x^2\right )}{4 d}+\frac{b^2 x^4}{8} \]

Antiderivative was successfully verified.

[In]

Int[x^3*(a + b*Sin[c + d*x^2])^2,x]

[Out]

(a^2*x^4)/4 + (b^2*x^4)/8 - (a*b*x^2*Cos[c + d*x^2])/d + (a*b*Sin[c + d*x^2])/d^2 - (b^2*x^2*Cos[c + d*x^2]*Si
n[c + d*x^2])/(4*d) + (b^2*Sin[c + d*x^2]^2)/(8*d^2)

Rule 3379

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3317

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3310

Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(d*(b*Sin[e + f*x])^n)/(f^2*n
^2), x] + (Dist[(b^2*(n - 1))/n, Int[(c + d*x)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[(b*(c + d*x)*Cos[e + f*
x]*(b*Sin[e + f*x])^(n - 1))/(f*n), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int x^3 \left (a+b \sin \left (c+d x^2\right )\right )^2 \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int x (a+b \sin (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (a^2 x+2 a b x \sin (c+d x)+b^2 x \sin ^2(c+d x)\right ) \, dx,x,x^2\right )\\ &=\frac{a^2 x^4}{4}+(a b) \operatorname{Subst}\left (\int x \sin (c+d x) \, dx,x,x^2\right )+\frac{1}{2} b^2 \operatorname{Subst}\left (\int x \sin ^2(c+d x) \, dx,x,x^2\right )\\ &=\frac{a^2 x^4}{4}-\frac{a b x^2 \cos \left (c+d x^2\right )}{d}-\frac{b^2 x^2 \cos \left (c+d x^2\right ) \sin \left (c+d x^2\right )}{4 d}+\frac{b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}+\frac{1}{4} b^2 \operatorname{Subst}\left (\int x \, dx,x,x^2\right )+\frac{(a b) \operatorname{Subst}\left (\int \cos (c+d x) \, dx,x,x^2\right )}{d}\\ &=\frac{a^2 x^4}{4}+\frac{b^2 x^4}{8}-\frac{a b x^2 \cos \left (c+d x^2\right )}{d}+\frac{a b \sin \left (c+d x^2\right )}{d^2}-\frac{b^2 x^2 \cos \left (c+d x^2\right ) \sin \left (c+d x^2\right )}{4 d}+\frac{b^2 \sin ^2\left (c+d x^2\right )}{8 d^2}\\ \end{align*}

Mathematica [A]  time = 0.220874, size = 92, normalized size = 0.9 \[ \frac{4 a^2 d^2 x^4+16 a b \sin \left (c+d x^2\right )-16 a b d x^2 \cos \left (c+d x^2\right )-2 b^2 d x^2 \sin \left (2 \left (c+d x^2\right )\right )-b^2 \cos \left (2 \left (c+d x^2\right )\right )+2 b^2 d^2 x^4}{16 d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x^3*(a + b*Sin[c + d*x^2])^2,x]

[Out]

(4*a^2*d^2*x^4 + 2*b^2*d^2*x^4 - 16*a*b*d*x^2*Cos[c + d*x^2] - b^2*Cos[2*(c + d*x^2)] + 16*a*b*Sin[c + d*x^2]
- 2*b^2*d*x^2*Sin[2*(c + d*x^2)])/(16*d^2)

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 93, normalized size = 0.9 \begin{align*}{\frac{{a}^{2}{x}^{4}}{4}}+{\frac{{b}^{2}{x}^{4}}{8}}-{\frac{{b}^{2}}{2} \left ({\frac{{x}^{2}\sin \left ( 2\,d{x}^{2}+2\,c \right ) }{4\,d}}+{\frac{\cos \left ( 2\,d{x}^{2}+2\,c \right ) }{8\,{d}^{2}}} \right ) }+2\,ab \left ( -1/2\,{\frac{{x}^{2}\cos \left ( d{x}^{2}+c \right ) }{d}}+1/2\,{\frac{\sin \left ( d{x}^{2}+c \right ) }{{d}^{2}}} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a+b*sin(d*x^2+c))^2,x)

[Out]

1/4*a^2*x^4+1/8*b^2*x^4-1/2*b^2*(1/4/d*x^2*sin(2*d*x^2+2*c)+1/8/d^2*cos(2*d*x^2+2*c))+2*a*b*(-1/2/d*x^2*cos(d*
x^2+c)+1/2/d^2*sin(d*x^2+c))

________________________________________________________________________________________

Maxima [A]  time = 1.01859, size = 117, normalized size = 1.15 \begin{align*} \frac{1}{4} \, a^{2} x^{4} - \frac{{\left (d x^{2} \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right )} a b}{d^{2}} + \frac{{\left (2 \, d^{2} x^{4} - 2 \, d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - \cos \left (2 \, d x^{2} + 2 \, c\right )\right )} b^{2}}{16 \, d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*sin(d*x^2+c))^2,x, algorithm="maxima")

[Out]

1/4*a^2*x^4 - (d*x^2*cos(d*x^2 + c) - sin(d*x^2 + c))*a*b/d^2 + 1/16*(2*d^2*x^4 - 2*d*x^2*sin(2*d*x^2 + 2*c) -
 cos(2*d*x^2 + 2*c))*b^2/d^2

________________________________________________________________________________________

Fricas [A]  time = 1.97841, size = 188, normalized size = 1.84 \begin{align*} \frac{{\left (2 \, a^{2} + b^{2}\right )} d^{2} x^{4} - 8 \, a b d x^{2} \cos \left (d x^{2} + c\right ) - b^{2} \cos \left (d x^{2} + c\right )^{2} - 2 \,{\left (b^{2} d x^{2} \cos \left (d x^{2} + c\right ) - 4 \, a b\right )} \sin \left (d x^{2} + c\right )}{8 \, d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*sin(d*x^2+c))^2,x, algorithm="fricas")

[Out]

1/8*((2*a^2 + b^2)*d^2*x^4 - 8*a*b*d*x^2*cos(d*x^2 + c) - b^2*cos(d*x^2 + c)^2 - 2*(b^2*d*x^2*cos(d*x^2 + c) -
 4*a*b)*sin(d*x^2 + c))/d^2

________________________________________________________________________________________

Sympy [A]  time = 2.25549, size = 136, normalized size = 1.33 \begin{align*} \begin{cases} \frac{a^{2} x^{4}}{4} - \frac{a b x^{2} \cos{\left (c + d x^{2} \right )}}{d} + \frac{a b \sin{\left (c + d x^{2} \right )}}{d^{2}} + \frac{b^{2} x^{4} \sin ^{2}{\left (c + d x^{2} \right )}}{8} + \frac{b^{2} x^{4} \cos ^{2}{\left (c + d x^{2} \right )}}{8} - \frac{b^{2} x^{2} \sin{\left (c + d x^{2} \right )} \cos{\left (c + d x^{2} \right )}}{4 d} + \frac{b^{2} \sin ^{2}{\left (c + d x^{2} \right )}}{8 d^{2}} & \text{for}\: d \neq 0 \\\frac{x^{4} \left (a + b \sin{\left (c \right )}\right )^{2}}{4} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(a+b*sin(d*x**2+c))**2,x)

[Out]

Piecewise((a**2*x**4/4 - a*b*x**2*cos(c + d*x**2)/d + a*b*sin(c + d*x**2)/d**2 + b**2*x**4*sin(c + d*x**2)**2/
8 + b**2*x**4*cos(c + d*x**2)**2/8 - b**2*x**2*sin(c + d*x**2)*cos(c + d*x**2)/(4*d) + b**2*sin(c + d*x**2)**2
/(8*d**2), Ne(d, 0)), (x**4*(a + b*sin(c))**2/4, True))

________________________________________________________________________________________

Giac [A]  time = 1.16025, size = 166, normalized size = 1.63 \begin{align*} \frac{\frac{4 \,{\left ({\left (d x^{2} + c\right )}^{2} - 2 \,{\left (d x^{2} + c\right )} c\right )} a^{2}}{d} - \frac{16 \,{\left (d x^{2} \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right )} a b}{d} - \frac{{\left (2 \, d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - 2 \,{\left (d x^{2} + c\right )}^{2} + 4 \,{\left (d x^{2} + c\right )} c + \cos \left (2 \, d x^{2} + 2 \, c\right )\right )} b^{2}}{d}}{16 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*sin(d*x^2+c))^2,x, algorithm="giac")

[Out]

1/16*(4*((d*x^2 + c)^2 - 2*(d*x^2 + c)*c)*a^2/d - 16*(d*x^2*cos(d*x^2 + c) - sin(d*x^2 + c))*a*b/d - (2*d*x^2*
sin(2*d*x^2 + 2*c) - 2*(d*x^2 + c)^2 + 4*(d*x^2 + c)*c + cos(2*d*x^2 + 2*c))*b^2/d)/d